<!DOCTYPE html>

<html>
    <head>
        
        
     
    </head>
    
    
    <body>

        <form action="Calc.php" method="post">
        <input name="Number1" type="text">
      

        <select name="Zeichen">
    <option>
     +   
    </option>
    
     <option>
     -  
    </option>
    
     <option>
     *   
    </option>
    
     <option>
     /  
    </option>
      </select>
        
        <input name="Number2" type="text">
        <input type="submit" value="Calulate">
</form>
        
        
        
    </body>
    
    
</html>

<?php

if (!isset($Number1))
{
    $Number1 = 0;
}

if (!isset($Number2))
{
    $Number2 = 0;
}

$Number1 = $_POST ["Number1"];
$Number2 = $_POST ["Number2"];
$Zeichen = $_POST ["Zeichen"];

if ($Zeichen == "+")
{
$Result = $Number1 + $Number2;
}

if ($Zeichen == "-")
{
$Result = $Number1 - $Number2;
}

if ($Zeichen == "*")
{
$Result = $Number1 * $Number2;
}

if ($Zeichen == "/")
{
$Result = $Number1 / $Number2;
}

echo "Das Ergebnis ist ". $Result;





?>
